<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use DB;
class PortalpostController extends Controller
{
	/**
	 * 门户--新闻详情
	 * $id--新闻内容(portalpost)的id
	 */
    public function getScan($id)
    {	
        //点击时阅读次数+1
        $reads=DB::table('portalpost')->where('id',$id)->value('reads');
        $reads +=1;
        
        DB::table('portalpost')->where('id',$id)->update(['reads'=>$reads]);

    	$post=DB::table('portalpost')->where('id',$id)->get();
    	// dd($post);


    	return view('Home.portal.post',['post'=>$post]);

    }
}
